﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json;
using Volo.Abp.Application.Dtos;

namespace PasteLoggerBoard.serilogmodels
{
    ///<summary>
    ///
    ///</summary>
    public class LogErrorListDto : EntityDto<long>
    {

        ///<summary>
        ///应用名称 16
        ///</summary>
        [MaxLength(16)]
        public string AppName { get; set; }

        ///<summary>
        ///日志日期时间
        ///</summary>

        public DateTime DateLog { get; set; }

        ///<summary>
        ///日志时间 时间戳
        ///</summary>

        public long TimeLong { get; set; }

        ///<summary>
        ///日志等级 16
        ///</summary>
        [MaxLength(16)]
        public string Level { get; set; }

        ///<summary>
        ///消息模板 256
        ///</summary>
        [MaxLength(256)]
        public string MessageTemplate { get; set; }

        ///<summary>
        ///消息属性
        ///</summary>

        public JsonElement Properties { get; set; }

        ///<summary>
        ///请求ID 32
        ///</summary>
        [MaxLength(32)]
        public string RequestId { get; set; }

        ///<summary>
        ///请求路径 128
        ///</summary>
        [MaxLength(128)]
        public string Path { get; set; }

        ///<summary>
        ///耗时 毫秒
        ///</summary>

        public double ElapsedMilliseconds { get; set; }

        ///<summary>
        ///连接ID 32
        ///</summary>
        [MaxLength(32)]
        public string ConnectionId { get; set; }

        ///<summary>
        ///状态码
        ///</summary>

        public int StatusCode { get; set; }

        ///<summary>
        ///客户端IP 32
        ///</summary>
        [MaxLength(32)]
        public string ClientIp { get; set; }

        ///<summary>
        ///异常信息
        ///</summary>

        public string Exception { get; set; }
    }

    ///<summary>
    ///日志消息info
    ///</summary>
    public class LogInfoListDto : EntityDto<long>
    {

        ///<summary>
        ///应用名称 16
        ///</summary>
        [MaxLength(16)]
        public string AppName { get; set; }

        ///<summary>
        ///日志日期时间
        ///</summary>

        public DateTime DateLog { get; set; }

        ///<summary>
        ///日志时间 时间戳
        ///</summary>

        public long TimeLong { get; set; }

        ///<summary>
        ///日志等级 16
        ///</summary>
        [MaxLength(16)]
        public string Level { get; set; }

        ///<summary>
        ///消息模板 256
        ///</summary>
        [MaxLength(256)]
        public string MessageTemplate { get; set; }

        ///<summary>
        ///消息属性
        ///</summary>

        public JsonElement Properties { get; set; }

        ///<summary>
        ///请求ID 32
        ///</summary>
        [MaxLength(32)]
        public string RequestId { get; set; }

        ///<summary>
        ///请求路径 128
        ///</summary>
        [MaxLength(128)]
        public string Path { get; set; }

        ///<summary>
        ///耗时 毫秒
        ///</summary>

        public double ElapsedMilliseconds { get; set; }

        ///<summary>
        ///连接ID 32
        ///</summary>
        [MaxLength(32)]
        public string ConnectionId { get; set; }

        ///<summary>
        ///状态码
        ///</summary>

        public int StatusCode { get; set; }

        ///<summary>
        ///客户端IP 32
        ///</summary>
        [MaxLength(32)]
        public string ClientIp { get; set; }
    }

    ///<summary>
    ///
    ///</summary>
    public class LogExceptionListDto : EntityDto<long>
    {

        ///<summary>
        ///应用名称 16
        ///</summary>
        [MaxLength(16)]
        public string AppName { get; set; }

        ///<summary>
        ///日志日期时间
        ///</summary>

        public DateTime DateLog { get; set; }

        ///<summary>
        ///日志时间 时间戳
        ///</summary>

        public long TimeLong { get; set; }

        ///<summary>
        ///日志等级 16
        ///</summary>
        [MaxLength(16)]
        public string Level { get; set; }

        ///<summary>
        ///消息模板 256
        ///</summary>
        [MaxLength(256)]
        public string MessageTemplate { get; set; }

        ///<summary>
        ///消息属性
        ///</summary>

        public JsonElement Properties { get; set; }

        ///<summary>
        ///请求ID 32
        ///</summary>
        [MaxLength(32)]
        public string RequestId { get; set; }

        ///<summary>
        ///请求路径 128
        ///</summary>
        [MaxLength(128)]
        public string Path { get; set; }

        ///<summary>
        ///耗时 毫秒
        ///</summary>

        public double ElapsedMilliseconds { get; set; }

        ///<summary>
        ///连接ID 32
        ///</summary>
        [MaxLength(32)]
        public string ConnectionId { get; set; }

        ///<summary>
        ///状态码
        ///</summary>

        public int StatusCode { get; set; }

        ///<summary>
        ///客户端IP 32
        ///</summary>
        [MaxLength(32)]
        public string ClientIp { get; set; }

        ///<summary>
        ///异常信息
        ///</summary>

        public string Exception { get; set; }
    }

    ///<summary>
    ///
    ///</summary>
    public class LogWarningListDto : EntityDto<long>
    {

        ///<summary>
        ///应用名称 16
        ///</summary>
        [MaxLength(16)]
        public string AppName { get; set; }

        ///<summary>
        ///日志日期时间
        ///</summary>
        public DateTime DateLog { get; set; }

        ///<summary>
        ///日志时间 时间戳
        ///</summary>
        public long TimeLong { get; set; }

        ///<summary>
        ///日志等级 16
        ///</summary>
        [MaxLength(16)]
        public string Level { get; set; }

        ///<summary>
        ///消息模板 256
        ///</summary>
        [MaxLength(256)]
        public string MessageTemplate { get; set; }

        ///<summary>
        ///消息属性
        ///</summary>
        public JsonElement Properties { get; set; }

        ///<summary>
        ///请求ID 32
        ///</summary>
        [MaxLength(32)]
        public string RequestId { get; set; }

        ///<summary>
        ///请求路径 128
        ///</summary>
        [MaxLength(128)]
        public string Path { get; set; }

        ///<summary>
        ///耗时 毫秒
        ///</summary>
        public double ElapsedMilliseconds { get; set; }

        ///<summary>
        ///连接ID 32
        ///</summary>
        [MaxLength(32)]
        public string ConnectionId { get; set; }

        ///<summary>
        ///状态码
        ///</summary>
        public int StatusCode { get; set; }

        ///<summary>
        ///客户端IP 32
        ///</summary>
        [MaxLength(32)]
        public string ClientIp { get; set; }

        ///<summary>
        ///浏览器标识 128
        ///</summary>
        [MaxLength(128)]
        public string UserAgent { get; set; }

    }

    /// <summary>
    /// 
    /// </summary>
    public class InputSearchLog:InputSearchBase
    {
        /// <summary>
        /// 
        /// </summary>
        public DateTime sdate { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public DateTime edate { get; set; }

        /// <summary>
        /// 客户端ip
        /// </summary>
        public string clientip { get; set; }

        /// <summary>
        /// 应用名称
        /// </summary>
        public string appname { get; set; }

        /// <summary>
        /// 连接id
        /// </summary>
        public string connectionid { get; set; }

        /// <summary>
        /// 路径
        /// </summary>
        public string path { get; set; }

        /// <summary>
        /// 请求id
        /// </summary>
        public string requestid { get; set; }
    }

}
